package com.gsk.europepharma.salesReport.hibernate.base;

import org.hibernate.Hibernate;
import org.hibernate.Session;
import com.gsk.europepharma.salesReport.hibernate.dao.iface.tbSpBoSRSectoDAO;
import org.hibernate.criterion.Order;

/**
 * This is an automatically generated DAO class which should not be edited.
 */
public abstract class BasetbSpBoSRSectoDAO extends com.gsk.europepharma.salesReport.hibernate.dao._RootDAO {

	public BasetbSpBoSRSectoDAO () {}
	
	public BasetbSpBoSRSectoDAO (Session session) {
		super(session);
	}

	// query name references
	public static final String QUERY_RECUP_NIVEAU_LOGIN = "recupNiveauLogin";
	public static final String QUERY_TREE_SECTO = "treeSecto";
	public static final String QUERY_GRAPH_DYNAMIC_SECTO = "graphDynamicSecto";
	public static final String QUERY_GRAPH_DYNAMIC_UGA = "graphDynamicUga";
	public static final String QUERY_GRAPH_BUBBLE = "graphBubble";
	public static final String QUERY_GRAPH_BUBBLE_U_G_A = "graphBubbleUGA";
	public static final String QUERY_GRAPH_BUBBLE_UGP = "graphBubbleUgp";
	public static final String QUERY_GRAPH_DELTA_P_M = "graphDeltaPM";
	public static final String QUERY_GRAPH_DELTA_P_M_UGA = "graphDeltaPMUga";
	public static final String QUERY_GRAPH_DELTA_P_M_UGP = "graphDeltaPMUgp";
	public static final String QUERY_GRAPH_CONTRIB_SECTO = "graphContribSecto";
	public static final String QUERY_GRAPH_CONTRIB_U_G_A = "graphContribUGA";
	public static final String QUERY_GRAPH_QUOTA_SECTO = "graphQuotaSecto";
	public static final String QUERY_GRAPH_QUOTA_UGA = "graphQuotaUga";
	public static final String QUERY_TABLE = "table";
	public static final String QUERY_TOP_UGP_WITH_FILTER = "topUgpWithFilter";
	public static final String QUERY_TOP_UGP_WITHOUT_FILTER = "topUgpWithoutFilter";
	public static final String QUERY_TOP_UGP_ALL = "topUgpAll";
	public static final String QUERY_TOP_UGP_COUNT_WITH_FILTER = "topUgpCountWithFilter";
	public static final String QUERY_TOP_UGP_COUNT_WITHOUT_FILTER = "topUgpCountWithoutFilter";
	public static final String QUERY_TOP_UGA = "topUga";
	public static final String QUERY_TOP_UGA_ALL = "topUgaAll";
	public static final String QUERY_TOP_UGA_COUNT = "topUgaCount";
	public static final String QUERY_QUERY_LISTE_CONTACT_UGA = "queryListeContactUga";
	public static final String QUERY_RECUP_SALES = "recupSales";
	public static final String QUERY_QUERY_LISTE_CONTACT_UGP = "queryListeContactUgp";
	public static final String QUERY_QUERY_LISTE_MEDECINS = "queryListeMedecins";
	public static final String QUERY_QUERY_LISTE_MEDECINS_ALL = "queryListeMedecinsAll";
	public static final String QUERY_QUERY_LISTE_MEDECINS_COUNT = "queryListeMedecinsCount";
	public static final String QUERY_QUERY_LISTE_ADM_PDT_USER = "queryListeAdmPdtUser"; // Page d accueil 
	public static final String QUERY_QUERY_LISTE_ADM_PDT_ADMIN = "queryListeAdmPdtAdmin"; // Page d accueil 
	public static final String QUERY_cs_adm_rgpt = "querycsAdmRgpt";
	public static final String QUERY_DATA_MONTH = "queryDataMonth";
	public static final String QUERY_DATA_MONTH_LIB = "queryDataMonthLib";
	public static final String QUERY_RECUP_EQUIPES = "recupEquipes";
	public static final String QUERY_RECUP_SPECIALITES = "recupSpecialites";
	public static final String QUERY_RECUP_PRODUITS = "recupProduits";
	public static final String QUERY_RECUP_SOURCES = "recupSources";
	
	public static tbSpBoSRSectoDAO instance;

	/**
	 * Return a singleton of the DAO
	 */
	public static tbSpBoSRSectoDAO getInstance () {
		if (null == instance) instance = new com.gsk.europepharma.salesReport.hibernate.dao.tbSpBoSRSectoDAO();
		return instance;
	}

	public Class getReferenceClass () {
		return com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto.class;
	}

    public Order getDefaultOrder () {
		return null;
    }

	/**
	 * Cast the object as a com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto
	 */
	public com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto cast (Object object) {
		return (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto) object;
	}

	public com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto get(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto key)
	{
		return (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto) get(getReferenceClass(), key);
	}

	public com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto get(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto key, Session s)
	{
		return (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto) get(getReferenceClass(), key, s);
	}

	public com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto load(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto key)
	{
		return (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto) load(getReferenceClass(), key);
	}

	public com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto load(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto key, Session s)
	{
		return (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto) load(getReferenceClass(), key, s);
	}

	public com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto loadInitialize(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto key, Session s) 
	{ 
		com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto obj = load(key, s); 
		if (!Hibernate.isInitialized(obj)) {
			Hibernate.initialize(obj);
		} 
		return obj; 
	}

/* Generic methods */

	/**
	 * Return all objects related to the implementation of this DAO with no filter.
	 */
	public java.util.List<com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto> findAll () {
		return super.findAll();
	}

	/**
	 * Return all objects related to the implementation of this DAO with no filter.
	 */
	public java.util.List<com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto> findAll (Order defaultOrder) {
		return super.findAll(defaultOrder);
	}

	/**
	 * Return all objects related to the implementation of this DAO with no filter.
	 * Use the session given.
	 * @param s the Session
	 */
	public java.util.List<com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto> findAll (Session s, Order defaultOrder) {
		return super.findAll(s, defaultOrder);
	}

	/**
	 * Persist the given transient instance, first assigning a generated identifier. (Or using the current value
	 * of the identifier property if the assigned generator is used.) 
	 * @param tbSpBoSRSecto a transient instance of a persistent class 
	 * @return the class identifier
	 */
	public com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto save(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto)
	{
		return (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto) super.save(tbSpBoSRSecto);
	}

	/**
	 * Persist the given transient instance, first assigning a generated identifier. (Or using the current value
	 * of the identifier property if the assigned generator is used.) 
	 * Use the Session given.
	 * @param tbSpBoSRSecto a transient instance of a persistent class
	 * @param s the Session
	 * @return the class identifier
	 */
	public com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto save(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto, Session s)
	{
		return (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto) save((Object) tbSpBoSRSecto, s);
	}

	/**
	 * Either save() or update() the given instance, depending upon the value of its identifier property. By default
	 * the instance is always saved. This behaviour may be adjusted by specifying an unsaved-value attribute of the
	 * identifier property mapping. 
	 * @param tbSpBoSRSecto a transient instance containing new or updated state 
	 */
	public void saveOrUpdate(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto)
	{
		saveOrUpdate((Object) tbSpBoSRSecto);
	}

	/**
	 * Either save() or update() the given instance, depending upon the value of its identifier property. By default the
	 * instance is always saved. This behaviour may be adjusted by specifying an unsaved-value attribute of the identifier
	 * property mapping. 
	 * Use the Session given.
	 * @param tbSpBoSRSecto a transient instance containing new or updated state.
	 * @param s the Session.
	 */
	public void saveOrUpdate(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto, Session s)
	{
		saveOrUpdate((Object) tbSpBoSRSecto, s);
	}

	/**
	 * Update the persistent state associated with the given identifier. An exception is thrown if there is a persistent
	 * instance with the same identifier in the current session.
	 * @param tbSpBoSRSecto a transient instance containing updated state
	 */
	public void update(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto) 
	{
		update((Object) tbSpBoSRSecto);
	}

	/**
	 * Update the persistent state associated with the given identifier. An exception is thrown if there is a persistent
	 * instance with the same identifier in the current session.
	 * Use the Session given.
	 * @param tbSpBoSRSecto a transient instance containing updated state
	 * @param the Session
	 */
	public void update(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto, Session s)
	{
		update((Object) tbSpBoSRSecto, s);
	}

	/**
	 * Remove a persistent instance from the datastore. The argument may be an instance associated with the receiving
	 * Session or a transient instance with an identifier associated with existing persistent state. 
	 * @param tbSpBoSRSecto the instance to be removed
	 */
	public void delete(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto)
	{
		delete((Object) tbSpBoSRSecto);
	}

	/**
	 * Remove a persistent instance from the datastore. The argument may be an instance associated with the receiving
	 * Session or a transient instance with an identifier associated with existing persistent state. 
	 * Use the Session given.
	 * @param tbSpBoSRSecto the instance to be removed
	 * @param s the Session
	 */
	public void delete(com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto, Session s)
	{
		delete((Object) tbSpBoSRSecto, s);
	}
	
	/**
	 * Re-read the state of the given instance from the underlying database. It is inadvisable to use this to implement
	 * long-running sessions that span many business tasks. This method is, however, useful in certain special circumstances.
	 * For example 
	 * <ul> 
	 * <li>where a database trigger alters the object state upon insert or update</li>
	 * <li>after executing direct SQL (eg. a mass update) in the same session</li>
	 * <li>after inserting a Blob or Clob</li>
	 * </ul>
	 */
	public void refresh (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRSecto tbSpBoSRSecto, Session s)
	{
		refresh((Object) tbSpBoSRSecto, s);
	}


}